import http from "@/api";

import { ResPage } from "@/api/interface";

import { AppCarouselsEntity, AppCarouselsVo } from "@/biz/interface/SysType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取系统轮播图列表
export const getAppCarouselsVoListApi = (params: {}) => {
  return http.post<ResPage<AppCarouselsVo>>(moduleUrl + `/job/calvolist`, params);
};

// * 新增系统轮播图接口
export const saveAppCarouselsApi = (appCarousels: AppCarouselsEntity) => {
  return http.post(moduleUrl + `/job/calsave`, appCarousels);
};

// * 详情系统轮播图接口
export const getAppCarouselsInfoApi = (params: { id: string }) => {
  return http.post<AppCarouselsEntity>(moduleUrl + `/job/calinfo`, params);
};

// * 删除系统轮播图接口
export const deleteAppCarouselsApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/job/caldelete`, params);
};

// * 修改系统轮播图状态接口
export const changeFlagActiveApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/job/calactive`, params);
};
